#pragma once

#include <QObject>
#include <QWidget>
#include <QMap>
#include "TalkWindowShell.h"
class TalkWindow;


class WindowManager : public QObject
{
	Q_OBJECT

private:
	WindowManager();
	~WindowManager();

private:
	static WindowManager* manage;

public:
	void addNewTalkWindow(const QString & qWindowId);

	static WindowManager* getInstance();

	QWidget* findWindowId(const QString &qWindowId);
	void deleteWindowId(const QString &qWindowId);
	void addWindowId(const QString &qWindowId, QWidget* qWidget);

	TalkWindowShell *m_talkwindowshell;

	//返回当前创建的窗口ID
	QString getWindowId();

private:
	//TalkWindowShell *m_talkwindowshell;

	QMap<QString, QWidget*> m_windowMap;

	QString WindowId;
};
